POV-Ray : Newsgroups : povray.animations : Animation block...acceleration on the x axis. : Animation block...acceleration on the x axis. Server Time
27 Apr 2024 01:55:49 EDT (-0400)
  Animation block...acceleration on the x axis.  
From: RC
Date: 23 Feb 2009 16:45:01
Message: <web.49a3163629ff894ce1acfc5e0@news.povray.org>
Hello,

I know this question is going to be a head slapper but I can't seem to get an
object to increase in speed. I need this object to increase in speed every x
clock cycles, so I'm using an if statement. Problem is I can get it to enter
the 'else' section, but it never returns to my original condition after I reset
my variable counting to x (num).

        #declare num = clock*60;
        //60 being the total number of frames
        #declare speed = clock;
        #if (num <= 3)
              object { Ball
                scale 0.7
                translate <-5.5, 0, 0>
                translate <speed, 0, 0>
                #declare num = num + 1;
               }
              #debug "speed the same\n"
        #else
              #declare speed = speed + 1;
              #declare num = clock;
              #debug"speed increased\n"
        #end

This is hurting my brain, and I know the answer is staring me down I just can't
see it. Any input? I have a feeling its related to the declare statements.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.